<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>javascript build website</title>
<script src="http://www.m3958.com/yui/3.5.0pr2/build/yui/yui-min.js"></script>
<script type="text/javascript" src="/yuicombo?prefix=/m3958-module-js/&javascriptarticle.js&javascriptsection.js&javascriptsite.js&section-widget.js&mouse-move-delay.js&simple-box-widget.js&bing-box-widget.js&bing-box-group-component.js"></script>
<link rel="stylesheet" href="/yuicombo?prefix=/m3958-module-css/&type=css&sectionwidget.css&bing-box-widget.css">
<!-- 
<script type="text/javascript" src="/javascriptsite.js"></script>
 -->
 <style type="text/css">
 #iddd{
 	background: url("/fd/s/a/h9.png") repeat scroll -59px -123px transparent;
 }
 
.yui3-sectionwidget-content .yui3-widget-ft .yui3-widget-button-wrapper .yui3-button{
	
}
 
 </style>
<script type="text/javascript">

var m3958_host = 'http://www.m3958.com/';
(function(){
	var hr = window.location.href.toUpperCase();
	if(hr.indexOf('8888') == -1){
		if(hr.indexOf('debug=true') != -1){
			m3958_host = 'file:///E:/eclipse-jee-helios-SR1-win32/xyzcms/war/';
		}
	}else{
		m3958_host = 'http://127.0.0.1:8888/';
	}
})();
	
YUI(
	{combine: true,
//		fetchCSS : false,
		comboBase: m3958_host + 'combo/yui?'
/*	modules:{
		'javascript-article' : {
			requires:['base','jsonp', 'jsonp-url','dump','node','array-extras'],
			fullpath : m3958_host + 'm3958-module-js/javascriptarticle.js'
		},
		'javascript-section' : {
			requires:['base',"datasource-get", "datasource-jsonschema","datasource-cache",'node'],
			fullpath : m3958_host + 'm3958-module-js/javascriptsection.js'
		},
		'javascript-site' : {
			requires:['base','jsonp', 'jsonp-url','dump','node','javascript-section'],
			fullpath : m3958_host + 'm3958-module-js/javascriptsite.js'
		},
		'section-widget' : {
			requires:["base","widget","widget-stdmod","widget-buttons", "substitute","section-widget-css"],
			fullpath : m3958_host + 'm3958-module-js/section-widget.js'
		},
		'section-widget-css' : {
			type: "css",
			fullpath : m3958_host + 'm3958-module-css/sectionwidget.css'
		},
		'bing-box-widget-css' : {
	        type: "css",
	        fullpath: m3958_host + 'm3958-module-css/bing-box-widget.css'
		},
		'mouse-move-delay' : {
			requires:["base","event"],
			fullpath : m3958_host + 'm3958-module-js/mouse-move-delay.js'
		},
		'simple-box-widget' : {
			requires:["base","widget","widget-position","widget-position-align", "substitute","array-extras","bing-box-widget-css","transition","event"],
			fullpath : m3958_host + 'm3958-module-js/simple-box-widget.js'
		},
		'bing-box-widget' : {
			requires:["base","widget","widget-position","widget-position-align", "substitute","array-extras","bing-box-widget-css","transition","event","mouse-move-delay","simple-box-widget"],
			fullpath : m3958_host + 'm3958-module-js/bing-box-widget.js'
		},
		'bing-box-group-component' : {
			requires:["base","widget","widget-position","widget-position-align", "substitute","array-extras","bing-box-widget-css","transition","event","mouse-move-delay","simple-box-widget","array-extras"],
			fullpath : m3958_host + 'm3958-module-js/bing-box-group-component.js'
		}
}*/}).use('javascript-site','javascript-section','javascript-article','section-widget','bing-box-widget','bing-box-widget','bing-box-group-component','mouse-move-delay.js',function(Y){
	var jsite = new Y.M3958.JavascriptSite({siteId : 74067});
	jsite.on('siteReady',function(e){
		var section = this.findSection(74087);
		/*
		section.on('sectionReady',function(e){
			var articles = this.articles;
			var tpl = '<li>{title}</li>';
			Y.each(articles,function(a){
				Y.one('#articleUl').append(Y.Lang.sub(tpl,{title:a.getTitle(3,'...')}));
			});
		});
		*/
		var sectionWidget = new Y.M3958.SectionWidget({section:section,width:800 /*,buttons: [
		                                                                                   {
		                                                                                       value  : 'Yes',
		                                                                                       section: Y.WidgetStdMod.HEADER,
		                                                                                       action : function (e) {
		                                                                                           e.preventDefault();
		                                                                                           nestedPanel.hide();
		                                                                                           panel.hide();
		                                                                                           removeItems();
		                                                                                       }
		                                                                                       
		                                                                                       
		                                                                                   },
		                                                                                   {
		                                                                                       value  : 'No',
		                                                                                       section: Y.WidgetStdMod.FOOTER,
		                                                                                       action : function (e) {
		                                                                                           e.preventDefault();
		                                                                                           nestedPanel.hide();
		                                                                                       },
		                                                                                       classNames : ['mybtnc','aludk']
		                                                                                   },
		                                                                                   {
		                                                                                	   value : 'close',
		                                                                                	   section: Y.WidgetStdMod.HEADER,
		                                                                                	   
		                                                                                   },
		                                                                               ]*/});
		sectionWidget.render();
		
		
		var bingBoxGroup = new Y.M3958.BingBoxGroupComponent();
		Y.log(bingBoxGroup);
		section.on('articleFetched',function(e){
			Y.log(e);
			var a =  e.articles[0];
			Y.each(e.articles,function(a){
				bingBoxGroup.set('article',a);
			});
		});
		
		section.fetchArticles(0,5,{usage:['list-file']});
/*		
		Y.later(5000,Y,function(e){
			section.fetchArticles(0,5);
		},[],false);
*/		
		/*
		Y.log(section);
		var processArticles = function(articles){
			var tpl = '<li>{title}</li>';
			Y.each(articles,function(a){
				Y.one('#articleUl').append(Y.Lang.sub(tpl,a));
			});
		};
		section.getArticles(processArticles,0,5);
		Y.later(5000,Y,function(e){
			section.getArticles(processArticles,0,5);
		},[],false);
		*/
	});
	jsite.fetchSite();
});

</script>
</head>
<body>
<ul id="articleUl">
</ul>
</body>
</html>